<div class="padding">
    <div class="toolbar f14 mt25 clearfix">
        <div class="toolbar-tab fl">
            <div material-ul active-li="img-text"></div>
        </div>
    </div>
    <!--/*图文消息*/-->
    <div class="change-box img-text">
        <div class="form clearfix">
            <div class="search-con">
                <input type="text" data-ng-model="searchMsg" class="form-control search-input" placeholder="标题/作者/摘要" id="search_input" ng-change="search()">
                <span class="x-icon x-icon-fix" id="x_clear" ng-show="searchMsg" ng-click="clearMsg()">×</span>
                <span class="search-btn search-icon" ng-click="search()"></span>
            </div>
        </div>
        <div class="title-row">
            <h3>图文消息(共<span id="data_num">{{imgTexts.total}}</span>个)</h3>
            <div class="view-type" ng-click="changeView($event)">
                <a href="javascript:;" class="card-view {{viewType == 'card'?'on':''}}" data-view="card" title="卡片式">卡片式</a>
                <a href="javascript:;" class="list-view {{viewType == 'list'?'on':''}}" data-view="list" title="列表式">列表式</a>
            </div>
            <a href="#/material/img_text/edit" class="btn-add pull-right" id="new_msg" >新建图文消息</a>
        </div>
        <div class="appmsg_list" ng-if="viewType == 'card'">
            <div class="appmsg_col" ng-repeat="imgText in imgTexts.data">
                <div class="inner">
                    <div>

                        <div class="appmsg" ng-if="imgText.articles.length==1">
                            <div class="appmsg_content">
                                <h4 class="appmsg_title">
                                    <a href="javascript:;" target="_blank">{{imgText.articles[0].title}}</a>
                                </h4>
                                <div class="appmsg_info">
                                    <em class="appmsg_date">{{imgText.modified_on*1000 | date:"yyyy-MM-dd hh:mm:ss"}}</em>
                                </div>
                                <div class="appmsg_thumb_wrp"><img ng-src="{{imgText.articles[0].cover_url}}" alt="" class="appmsg_thumb"></div>
                                <p class="appmsg_desc">{{imgText.articles[0].summary}}</p>
                            </div>
                            <div class="appmsg_opr">
                                <ul>
                                    <li class="appmsg_opr_item grid_item size1of2">
                                        <a href="#/material/img_text/edit/{{imgText.id}}" title="编辑">&nbsp;<i class="icon18_common edit_gray">编辑</i></a>
                                    </li>
                                    <li class="appmsg_opr_item grid_item no_extra size1of2">
                                        <a class="no_extra"  href="javascript:void(0);" title="删除" followmenu="imgText.id" ng-model="deleteObj">&nbsp;<i class="icon18_common del_gray">删除</i></a>
                                    </li>
                                </ul>
                            </div>
                        </div>

                        <div class="appmsg multi" ng-if="imgText.articles.length>1">
                            <div class="appmsg_content" ng-repeat="article in imgText.articles">
                                <div ng-if="$index==0">
                                <div class="appmsg_info">
                                    <em class="appmsg_date">{{imgText.modified_on*1000 | date:"yyyy-MM-dd hh:mm:ss"}}</em>
                                </div>
                                <div class="cover_appmsg_item">
                                    <h4 class="appmsg_title"><a href="javascript:;" target="_blank">{{article.title}}</a></h4>
                                    <div class="appmsg_thumb_wrp"><img ng-src="{{article.cover_url}}" alt="" class="appmsg_thumb"></div>
                                </div>
                                </div>

                                <div class="appmsg_item" ng-if="$index>0">
                                    <img ng-src="{{article.cover_url}}" alt="" class="appmsg_thumb">
                                    <h4 class="appmsg_title js_title"><a href="javascript:;" target="_blank">{{article.title}}</a></h4>
                                </div>
                            </div>
                            <div class="appmsg_opr">
                                <ul>
                                    <li class="appmsg_opr_item grid_item size1of2">
                                        <a href="#/material/img_text/edit/{{imgText.id}}" data-tooltip="编辑">&nbsp;<i class="icon18_common edit_gray">编辑</i></a>
                                    </li>
                                    <li class="appmsg_opr_item grid_item size1of2 no_extra">
                                        <a href="javascript:void(0);" data-tooltip="删除" followmenu="{{imgText.id}}" ng-model="deleteObj">&nbsp;<i class="icon18_common del_gray">删除</i></a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
        <div class="appmsg_list_v" ng-if="viewType == 'list'">
            <ul class="inner_list_v">
                <li class="appmsg_item_v" ng-repeat="imgText in imgTexts.data">
                    <div class="inner">
                        <div class="content">
                            <img ng-src="{{imgText.articles[0].cover_url}}" class="content_cover">
                            <div class="content_abstract">
                                <p ng-repeat="article in imgText.articles"><a target="_blank" class="abstract_tit" href="javascript:;">{{imgText.articles.length > 1 ? ($index+1)+'.' : ''}}{{article.title}}</a></p>
                            </div>
                        </div>
                        <div class="opr">
                            <a href="#/material/img_text/edit/{{imgText.id}}">编辑</a>
                            <a href="javascript:;" ng-click="deleteImgText(imgText.id)" followmenu="{{imgText.id}}" ng-model="deleteObj">删除</a>
                        </div>
                        <div class="date">
                            <p>{{imgText.modified_on*1000 | date:"yyyy-MM-dd hh:mm:ss"}}</p>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
        <div pagination ng-model="pagination"></div>
    </div>

</div>